var windowName = "suggest";
var Page;
apiready = function(){
    onWindowShow(function () {
        console.log(windowName + " show")
    })
    onWindowHide(function () {
        console.log(windowName + " hide")
    })
    console.log("index page is OK");
    Page = createVM("#Page",{
        content:""
    },{
        //页面方法
        "init":function () {
        }
        ,submit:function () {
            apiPost("/api/suggests",{content:this.content,cat:11},function (res,code) {
                logJson(res,"suggests")
                if (code == 200) {
                    gobackDelay()
                }
                showToast(res.message)
            })
        }
    })
    Page.init()
}